/**
 * Created with IntelliJ IDEA.
 * User: xi
 * Date: 13-11-20
 * Time: 下午3:07
 * To change this template use File | Settings | File Templates.
 */

var convertJsonToParam = function (name, json) {
    for (var i in json) {
        var child = json[i];
        return {key: name + "." + i, value: child};
    }
}

var param = convertJsonToParam("header", {
    header: {name: '123', age: 23}, body: {name: "hello"}
});
console.log(param);

$.ajax({
    url: "http://localhost:9696/moil/moil/device/reg",
    type: "post",
    data: {header: {name: '123', age: 23}, body: {name: "hello"}}, success: function (data) {
        console.log(data);
    }
});

var data = {

    "name": "android", "os": "Android", "osVersion": "Android 4.1.2", "brand": "samsung", "model": "GT-N7000",
    "isRoot": false, "width": 480, "height": 800, "description": "张三的手机", "deviceType": "Android",
    "deviceInfo": "", "clientVersion": "1.0", "isLock": false, "isActive": true,
    "imei": "353818051589677", "language": "中文件简体"

}
